package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.SysUserDAO;
import cn.mxb.logic.entity.SysUser;
import cn.mxb.logic.service.ISysUserService;

@Service("sysUserService")
public class SysUserServiceImpl  implements ISysUserService {

	@Autowired
	private SysUserDAO sysUserDAO;
	
	
	@Override
	public SysUser findByProperty(String property, String value) {
		return sysUserDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<SysUser> find(SysUser sysUser, int page, int row) {
		return sysUserDAO.find(sysUser, page, row);
	}

	/**
	 * add
	 */
	@Override
	public SysUser add(SysUser SysUser) {
		return sysUserDAO.save(SysUser);
	}

	@Override
	public void delete(int id) {
		sysUserDAO.remove(SysUser.class,id);
	}
	@Override
	public void update(SysUser SysUser) {
		
	}
	
	@Override
	public List<SysUser> findListByProperty(String property, String value) {
		return sysUserDAO.findListByProperty(property, value);
	}

	/**
	 * 查询全部
	 */
	@Override
	public List<SysUser> findAllList() {
		return sysUserDAO.getAll(SysUser.class);
	}


	
}
